import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import postCssPxToRem from 'postcss-pxtorem'
import Components from 'unplugin-vue-components/vite'; 
import { VantResolver } from 'unplugin-vue-components/resolvers';
export default defineConfig({


  plugins: [ vue(), Components({ resolvers: [VantResolver()], }), ],
  css: {     
     postcss: {   
     plugins: [		
     postCssPxToRem({
     rootValue: 37.5,   
     propList: ["*"]    
     })
     ]
     }
     },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
  server:{
    host:'0.0.0.0',
    open:true,
    //自己
    allowedHosts: ['33145gy5g.shenzhuo.vip']
  }

 

})
